package com.hnucm.cooklife.contract.dishdetail;

import com.hnucm.cooklife.base.IBaseView;
import com.hnucm.cooklife.bean.db.DishDetail;
import com.hnucm.cooklife.bean.me.ToAddCollectData;
import com.hnucm.cooklife.bean.uploaddish.UpRece;

import java.util.List;

import io.reactivex.Observable;

public class Contract {
    public interface IDishDetailModel{
       Observable<DishDetail> loadDishDetail(Integer dishId);
       Observable<DishDetail> refreshDishDetail(Integer dishId);

       Observable<UpRece> updateHistory(int dishId,int userId);

        Observable<ToAddCollectData> collect(int userId, int dishId);
        Observable<ToAddCollectData> unCollcet(int userId,int dishId);
    }

    public interface IDishDetailView extends IBaseView {
        void onLoadDishDetail(DishDetail dishDetail);
        void onRefreshDishDetail(DishDetail dishDetail);

        void onCollect(ToAddCollectData collectData,int dishId);
        void onUnCollect(ToAddCollectData collectData,int dishId);
    }

    public interface IDishDetailPresenter{
        void loadDishDetail(Integer dishId);
        void refreshDishDetail(Integer dishId);

        void updateHistory(int dishId,int userId);


        void collect(int userId,int dishId);
        void unCollect(int userId,int dishId);
    }
}
